if [ -d "nginx" ];then
    echo "nginx文件夹已存在, 本脚本不支持覆盖安装!"
    exit
fi

if [ -d "mysql" ];then
    echo "mysql文件夹已存在, 本脚本不支持覆盖安装!"
    exit
fi

docker run --name=nginx -d -p 80:80 nginx:1.23.0
mkdir nginx
docker cp nginx:/etc/nginx/conf.d nginx
docker cp nginx:/usr/share/nginx/html nginx
docker stop nginx
docker rm nginx

docker run -idt --name mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=123456 mysql:5.7
mkdir mysql
docker cp mysql:/etc/mysql mysql/conf
docker cp mysql:/var/log/mysql mysql/log
docker stop mysql
docker rm mysql

docker-compose up -d